<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box{
            width:100px;
            height:100px;
            background-color: red;
        }
    </style>
</head>
<body>
    <button class="fadeIn">显示</button>
    <button class="fadeOut">隐藏</button>
    <div class="box"></div>
    <script src="script/jquery.js"></script>
    <script>
        $(".fadeIn").click(function(){
            $(".box").fadeIn(500);
        })
        $(".fadeOut").click(function(){
            $(".box").fadeOut(500);
        })
    </script>
</body>
</html>